package com.neuedu.service.impl;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.session.SqlSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.neuedu.domain.Userinfo;
import com.neuedu.mapper.UserinfoMapper;
import com.neuedu.service.UserinfoService;
import com.neuedu.util.SqlSessionFactoryUtil;
@Service
public class UserinfoServiceImpl implements UserinfoService{
	@Autowired
	UserinfoMapper um;
	@Override
	public int regEmailCheck(String email) {
		int count = um.regEmailCheck(email);
		return count;
	}
	@Override
	@Transactional
	public int addUserinfo(Userinfo userinfo) {
		int count = um.addUserinfo(userinfo);
		return count;
	}
	@Override
	public Userinfo loginCheck(Userinfo userinfo) {
		// TODO Auto-generated method stub
		return um.loginCheck(userinfo);
	}
	@Override
	@Transactional
	public int updatepass(Userinfo userinfo) {
		int count = um.updatepass(userinfo);
		return count;
	}
	@Override
	public int uploadHeadImg(Userinfo userinfo) {
		int count = um.uploadHeadImg(userinfo);
		return count;
		
	}
	@Override
	@Transactional
	public int activeMail(String mailcode) {
		int count = um.activeMail(mailcode);

		return count;
	}
	@Override
	public List<Map<String, Object>> selectArticle(int authorid) {		
		return um.selectArticle(authorid);
	}
	@Override
	public List<Map<String, Object>> selectMineTie(int authorid) {
		// TODO Auto-generated method stub
		return um.selectMineTie(authorid);
	}
	@Override
	public List<Map<String, Object>> selectMineaAns(int authorid) {
		// TODO Auto-generated method stub
		return um.selectMineaAns(authorid);
	}
	@Override
	@Transactional
	public int upMyMessage(Userinfo userinfo) {
		int count = um.upMyMessage(userinfo);
		return count;
	}
	@Override
	public Userinfo upEmail(String update_email) {
		// TODO Auto-generated method stub
		return um.upEmail(update_email);
	}
	@Override
	public List<Map<String, Object>> selectMyMessage(int id) {
		// TODO Auto-generated method stub
		return um.selectMyMessage(id);
	}
	@Override
	public Userinfo homeCheck(int id) {
		// TODO Auto-generated method stub
		return um.homeCheck(id);
	}
	@Override
	public int upqd(Userinfo userinfo) {
		
		return um.upqd(userinfo);
	}
	

}
